package io.gitee.zhangbinhub.admin.log.entity

import io.gitee.zhangbinhub.admin.log.base.BaseLogEntity
import io.swagger.v3.oas.annotations.media.Schema
import jakarta.persistence.*
import org.hibernate.annotations.GenericGenerator

/**
 * @author zhang by 21/05/2019
 * @since JDK 11
 */
@Entity
@Table(
    name = "t_log_gateway_route_history",
    uniqueConstraints = [UniqueConstraint(columnNames = ["logId", "requestTime"])],
    indexes = [Index(columnList = "requestTime")]
)
@Schema(description = "网关路由日志")
data class RouteLogHistory(
    @Id
    @GenericGenerator(name = "idGenerator", strategy = "uuid2")
    @GeneratedValue(generator = "idGenerator")
    @Column(length = 36, nullable = false)
    @Schema(description = "ID")
    var id: String = ""
) : BaseLogEntity()